//
//  HwwCreateManager.h
//  huangwenwuSDKDemo
//
//  Created by huangwenwu on 2020/3/7.
//  Copyright © 2020 黄文武. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

@interface HwwCreateManager : NSObject

/// 初始化
/// @param label label,imageView,button
- (HwwCreateManager *)initWithLabel:(UILabel *)label;
- (HwwCreateManager *)initWithImageView:(UIImageView *)imageView;
- (HwwCreateManager *)initWithButton:(UIButton *)button;
- (HwwCreateManager *)initWithTextField:(UITextField *)textfield;

//共有属性
- (HwwCreateManager *(^)(CGRect frame))frame;
- (HwwCreateManager *(^)(CGFloat alpha))alpha;//透明度
- (HwwCreateManager *(^)(CGFloat cornerRadius))cornerRadius;
- (HwwCreateManager *(^)(UIColor * borderColor))borderColor;
- (HwwCreateManager *(^)(CGFloat borderWidth))borderWidth;
- (HwwCreateManager *(^)(UIFont *font))font;
- (HwwCreateManager *(^)(CGFloat size))size;
- (HwwCreateManager *(^)(NSTextAlignment textAlignment))textAlignment;
- (HwwCreateManager *(^)(UIColor * backgroundColor))backgroundColor;

//UILabel属性
- (HwwCreateManager *(^)(NSString *test))test;//设置默认显示文字
- (HwwCreateManager *(^)(NSInteger tag))tag;
- (HwwCreateManager *(^)(UIColor *testColor))testColor;
- (HwwCreateManager *(^)(NSLineBreakMode lineBreakMode))lineBreakMode;
- (HwwCreateManager *(^)(NSInteger numberOfLines))numberOfLines;
- (HwwCreateManager *(^)(BOOL  highLighted))highLighted;
- (HwwCreateManager *(^)(UIColor * shadowColor))shadowColor;
- (HwwCreateManager *(^)(CGSize shadowOffset))shadowOffset;

//UIImageView属性
- (HwwCreateManager *(^)(UIImage *image))image;//Image 设置图片，默认显示
- (HwwCreateManager *(^)(UIImage *highlightedImage))highlightedImage;//设置高亮状态下显示的图片
- (HwwCreateManager *(^)(NSArray *animationImages))animationImages;//设置序列帧动画的图片数组
- (HwwCreateManager *(^)(NSArray *highlightedAnimationImages))highlightedAnimationImages;//设置高亮状态下序列帧动画的图片数组
- (HwwCreateManager *(^)(CGFloat animationDuration))animationDuration;//设置序列帧动画播放的时常
- (HwwCreateManager *(^)(CGFloat animationRepeatCount))animationRepeatCount;//设置序列帧动画播放的次数
- (HwwCreateManager *(^)(BOOL userInteractionEnabled))userInteractionEnabled;//设置是否允许用户交互，默认不允许用户交互
- (HwwCreateManager *(^)(BOOL imagehighlighted))imagehighlighted;//设置是否为高亮状态，默认为普通状态
- (HwwCreateManager *(^)(UIViewContentMode contentMode))contentMode;//填充方式
- (HwwCreateManager *(^)(BOOL clipsToBounds))clipsToBounds;//超出边界是否裁剪
- (HwwCreateManager *(^)(id  delegate,NSString *selector))gestures;//添加手势
//UIButton属性
- (HwwCreateManager *(^)(UIButtonType buttontype))buttontype;//按钮样式
- (HwwCreateManager *(^)(UIImage * backgroundImage,UIControlState state))backgroundImage;//按钮背景图片
- (HwwCreateManager *(^)(UIImage *buttonimage,UIControlState state))buttonimage;//给button添加前置图image(可以调整大小位置)
- (HwwCreateManager *(^)(UIEdgeInsets buttontype))imageEdgeInsets;//设置image在button上的位置（上top，左left，下bottom，右right）这里可以写负值，对上写－5，那么image就象上移动5个像素
- (HwwCreateManager *(^)(UIEdgeInsets titleEdgeInsets))titleEdgeInsets;////设置title在button上的位置（上top，左left，下bottom，右right）
- (HwwCreateManager *(^)(NSString *title,UIControlState state))title;//设置按钮标题及状态
//forState的状态
// UIControlStateNormal = 0, 常规状态显现
// UIControlStateHighlighted = 1 << 0, 高亮状态显现
// UIControlStateDisabled = 1 << 1, 禁用的状态才会显现
// UIControlStateSelected = 1 << 2, 选中状态
// UIControlStateApplication = 0x00FF0000, 当应用程序标志时
// UIControlStateReserved = 0xFF000000 为内部框架预留，可以不管他
- (HwwCreateManager *(^)(BOOL showsTouchWhenHighlighted))showsTouchWhenHighlighted;//这个属性设置为yes的状态下，按钮按下会发光
- (HwwCreateManager *(^)(UIColor *titlecolor,UIControlState state))titlecolor;//设置按钮标题颜色及状态

- (HwwCreateManager *(^)(UIControlContentHorizontalAlignment contentHorizontalAlignment))contentHorizontalAlignment;//设置button的内容横向居中。。设置content是title和image一起变化
- (HwwCreateManager *(^)(UIControlContentVerticalAlignment contentVerticalAlignment))contentVerticalAlignment;//设置button的内容竖向居中。。设置content是title和image一起变化
- (HwwCreateManager *(^)(NSString *selector,id delegate,UIControlEvents event))target;//按钮添加事件

//UITextField 属性
- (HwwCreateManager *(^)(UITextBorderStyle borderStyle))borderStyle;//设置边框样式，只有设置了才会显示边框样式
- (HwwCreateManager *(^)(UIImage *background))background;//设置背景
- (HwwCreateManager *(^)(UIImage *disabledBackground ))disabledBackground ;//设置背景
- (HwwCreateManager *(^)(NSString *placeholder))placeholder;//当输入框没有内容时，水印提示 提示内容为password
- (HwwCreateManager *(^)(UITextFieldViewMode clearButtonMode))clearButtonMode;//输入框中是否有个叉号，在什么时候显示，用于一次性删除输入框中的内容
- (HwwCreateManager *(^)(BOOL secureTextEntry))secureTextEntry;//每输入一个字符就变成点 用语密码输入
- (HwwCreateManager *(^)(UITextAutocorrectionType autocorrectionType))autocorrectionType;//是否纠错
- (HwwCreateManager *(^)(BOOL clearsOnBeginEditing))clearsOnBeginEditing;//再次编辑就清空
- (HwwCreateManager *(^)(BOOL adjustsFontSizeToFitWidth))adjustsFontSizeToFitWidth;//设置为YES时文本会自动缩小以适应文本窗口大小.默认是保持原来大小,而让长文本滚动
- (HwwCreateManager *(^)(CGFloat minimumFontSize))minimumFontSize;//设置自动缩小显示的最小字体大小
- (HwwCreateManager *(^)(UIKeyboardType keyboardType))keyboardType;///设置键盘的样式
- (HwwCreateManager *(^)(UITextAutocapitalizationType autocapitalizationType))autocapitalizationType;//首字母是否大写
- (HwwCreateManager *(^)(UIReturnKeyType returnKeyType))returnKeyType;///return键变成什么键
- (HwwCreateManager *(^)(UIKeyboardAppearance keyboardAppearance))keyboardAppearance;//设置键盘外观
- (HwwCreateManager *(^)(id<UITextFieldDelegate>delegate))delegate;//设置代理 用于实现协议



@end

NS_ASSUME_NONNULL_END
